import axios from 'axios'

// 登录
export const getLogin = (data) => {
  return axios({
    url: 'http://localhost:3002/v1.0/api/users/login',
    method: 'POST',
    data: data
  })
}

// 上传
export const getUpload = () => {
  return axios({
    url: 'http://localhost:3002/v1.0/api/upload',
    method: 'post',
    data: {
      file: ''
    }
  })
}
//  就业态势 
// 表格数据获取
export const EmpGetList = () => {
  return axios({
    method: 'get',
    url: 'http://localhost:3002/v1.0/api/student/list',
  })
}

// 智能检测 http://localhost:3000/apiTest/intelligentDetection/dataitem
export const IntGetList = () => {
  return axios({
    method: 'get',
    url: 'http://localhost:3002/v1.0/api/intelligentDetection/dataitem'
  })
}

// 安防管理  http://localhost:3000/apiTest/intelligentDetection/datapp
export const SecGetList = () => {
  return axios({
    method: 'get',
    url: 'http://localhost:3002/v1.0/api/intelligentDetection/datapp'
  })
}
// 设备运营   http://localhost:3000/apiTest/intelligentDetection/dataput
export const EquGetList = () => {
  return axios({
    method: 'get',
    url: 'http://localhost:3002/v1.0/api/intelligentDetection/dataput'
  })
}
// 设备运营  删除
export const EqGetDel = (params) => {
  let { id } = params;
  console.log(id);
  return axios({
    url: import.meta.env.VITE_BASE_API + `/delete`,
    data: id,
    method: "delete",
  });
}

// 设备运营 添加
export const EqGetAdd = (params) => {
  let {
    data
  } = params;
  // console.log(data);
  return axios({
    url: "http://localhost:3002/v1.0/api/student",
    data: data,
    method: "post",
  });
}

// 设备运营 修改
export const EqGetEdit = (params) => {
  let {
    data
  } = params;
  console.log(data);
  // console.log(data);
  return axios({
    url: import.meta.env.VITE_BASE_API + "student",
    data,
    method: "put",
  });
}